package com.study.config;

import com.study.bean.Person;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;

/**
 * @author wuwenbo
 * @date 2020/4/6 - 22:10
 */
//使用 @PropertySource 读取外部配置文件中的 k/v 保存到运行的环境变量中
@PropertySource(value={"classpath:/person.properties"},encoding="GBK")
@Configuration
public class MainConfigOfPropertyValue {

    @Bean
    public Person person(){
        return new Person();
    }
}
